# step = int(input())
# triangle_lst = [[1,0]]
# for i in range(1,step):
#     newline = [1]
#     for j in range(1,i+1):
#         newline.append(triangle_lst[i-1][j] + triangle_lst[i-1][j-1])
#     newline.append(0)
#     triangle_lst.append(newline)

step = int(input())
triangle_lst = [[0,1,0]]
for i in range(1,step):
    newline = list(map(lambda a,b:a+b,triangle_lst[i-1][0:-1],triangle_lst[-1][1:]))
    triangle_lst.append([0] + newline + [0])
if step > 2:
    for i in range(len(triangle_lst)):
        for j in range(1,i + 2):
            print(f"{triangle_lst[i][j]:<5d}",end = '')
        print('')